
//定义对象
// 使用方法创建对象
function createUser() {
    let person = new Object()

    //给person注册方法、属性
    person.name = "jshand"
    person.age = 19
    person.sayHi = function () {
        console.log(`我是${this.name},今年 :${this.age}`);

    }

    return person
}


let person1 = createUser();

console.log("person.name", person.name);
console.log("person.age", person.age);
person.sayHi()




let person2 = createUser();
console.log("person2.name", person2.name);
console.log("person2.age", person2.age);
person2.sayHi()


